# $Id: PKGBUILD 90158 2013-05-07 13:34:48Z spupykin $
# Maintainer: Vesa Kaihlavirta <vegai@iki.fi>
# Contributor: Sebastian Sareyko <public@nooms.de>

pkgname=gnustep-make
pkgver=2.6.4
pkgrel=1
pkgdesc="The GNUstep make package"
arch=('any')
url="http://www.gnustep.org/"
license=('GPL')
depends=()
conflicts=('gnustep-make-svn')
groups=('gnustep-core')
source=(ftp://ftp.gnustep.org/pub/gnustep/core/$pkgname-$pkgver.tar.gz)
md5sums=('c5617da024add87ce9b09726bb9328a6')

build() {
  cd $srcdir/$pkgname-$pkgver
  ./configure --prefix=/usr --sysconfdir=/etc/GNUstep
  make
}

package() {
  cd $srcdir/$pkgname-$pkgver
  make DESTDIR=$pkgdir install

  sed -i 's|GNUSTEP_HOST_CPU=.*|GNUSTEP_HOST_CPU=`uname -m`|' $pkgdir/usr/share/GNUstep/Makefiles/GNUstep.sh
  sed -i 's|GNUSTEP_HOST=.*|GNUSTEP_HOST=`uname -m`-unknown-linux-gnu|' $pkgdir/usr/share/GNUstep/Makefiles/GNUstep.sh
  install -D -m755 \
    $pkgdir/usr/share/GNUstep/Makefiles/GNUstep.sh \
    $pkgdir/etc/profile.d/GNUstep.sh
}
